package com.example.shiro.entity.base;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * 实体 基类
 * @Author: hwz
 * @Date: 2018/7/12
 */
@Data
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = -8155614054875719463L;

    @Id
    @GeneratedValue(generator = "JDBC")
    private Long id;

    @DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @DateTimeFormat(pattern="YYYY-MM-DD HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;

    @ApiModelProperty(value = "是否删除 默认0")
    private Integer isDelete = 0;

}
